package com.zmx.job.admin.core.nodedistribute.routestrategy;

import com.zmx.core.server.ClientInstanceInfo;
import com.zmx.job.admin.utils.RandomElementUtils;

import java.util.Map;

/**
 * @Description: 随机选取
 * @ClassName: Random
 * @Author zhaomxr
 * @Date 2021-12-22 15:32
 */
public class Random {

    public static String get() {
        Map<String, Boolean> onLineInstance = ClientInstanceInfo.getOnLineInstance();

        return (String) RandomElementUtils.getRandomSet(onLineInstance.keySet());
    }
}
